package com.cheng.xbsc.exception;

import com.cheng.xbsc.entity.vo.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @Author: 刘文铖
 */
@RestControllerAdvice
public class ControllerException {

    @ExceptionHandler(Exception.class)
    public Result error(Exception e) {
        e.printStackTrace();
        return new Result(false, e.getMessage());
    }
}
